package com.hbzd.protection.util;

import java.util.concurrent.atomic.AtomicLong;

/**
 * 数据库通用工具
 * 
 * @author LYW
 *
 */
public class DBServiceUtil {

	private static AtomicLong objIdx = new AtomicLong(10000L);

	public static String getObjId() {
		String objId = "-" + String.format("%05d",
						new Object[] { Long.valueOf(objIdx.getAndIncrement()) });
		return objId;
	}
	
	public static String getRandom() {
		String objId = String.format("%05d",
						new Object[] { Long.valueOf(objIdx.getAndIncrement()) });
		return objId;
	}
}
